<!DOCTYPE HTML>
<title>Canvas test: security.reset</title>
<!--[if IE]><script src="../excanvas/excanvas.js"></script><![endif]-->
<script src="../tests.js"></script>
<link rel="stylesheet" href="../tests.css">
<body class="framed show_output">
<h1>
<a href="security.reset.html" target="_parent">security.&#8203;reset</a>
</h1>
<p><a href="#" id="show_output" onclick="document.body.className += ' show_output'; return false">[show output]</a>
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>

<ul id="d"></ul>
<script>
_addTest(function(canvas, ctx) {

canvas.width = 50;
ctx.drawImage(document.getElementById('yellow.png'), 0, 0);
try { var _thrown = false; canvas.toDataURL(); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: canvas.toDataURL()"); }
canvas.width = 100;
try { var _thrown = false; canvas.toDataURL(); } catch (e) { _thrown = true; } finally { _assert(_thrown, "should throw exception: canvas.toDataURL()"); }


});
</script>
<img src="http://excors.googlepages.com/yellow.png" id="yellow.png" class="resource">

